//go:build wireinject

package startup

import (
	"gitee.com/youkelike/zmigrate/example/interactive/grpc"
	"gitee.com/youkelike/zmigrate/example/interactive/repository"
	"gitee.com/youkelike/zmigrate/example/interactive/repository/dao"
	"gitee.com/youkelike/zmigrate/example/interactive/service"
	"github.com/google/wire"
)

var thirdProvider = wire.NewSet(InitTestDB, InitLog)
var interactiveSvcProvider = wire.NewSet(
	service.NewInteractiveService,
	repository.NewInteractiveRepository,
	dao.NewGORMInteractiveDAO,
)

func InitInteractiveGRPCServer() *grpc.InteractiveServiceServer {
	wire.Build(thirdProvider, interactiveSvcProvider, grpc.NewInteractiveServiceServer)
	return new(grpc.InteractiveServiceServer)
}
